appState = (state={},action)->
  switch action.type
    when 'APPSTATE/ACTIVE/'
      Object.assign {},state,{active:action.payload is 'active'}
    when 'MAPPSTATE/CONNECTION'
      # Object.assign {},state,{connected:action.payload not in ['NONE','DUMMY','UNKNOWN']}
      Object.assign {},state,{connected:action.payload}
    else
      state

module.exports = appState
